import Vue from "vue";
import VueRouter from "vue-router";
import Hot from '@/views/Hot.vue';
import Soon from '@/views/Soon.vue';
import Top from '@/views/Top.vue';
import Detail from '@/views/Detail.vue';

Vue.use(VueRouter);

const routes = [
  {
    path: '/',
    redirect: '/hot',
  },
  {
    path: "/hot",
    component: Hot
  },
  {
    path: "/soon",
    component: Soon
  },
  {
    path: "/top",
    component: Top
  },
  {
    path: "/detail/:id",
    component: Detail
  },
];

const router = new VueRouter({
  mode: "hash",
  routes
});

export default router;
